/**
 * 作者：陈文斌 on 2019/1/18.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:json_annotation/json_annotation.dart';
import 'package:crm/model/Employee/employee_model.dart';

part 'company_department_model.g.dart';

@JsonSerializable()
class CompanyDepartmentModel extends Object
    with _$CompanyDepartmentModelSerializerMixin {
  String Id;
  int Ordering;
  String Name;
  String Notes;
  String ParentId;
  CompanyDepartmentModel Parent;
  CompanyDepartmentModel Children;
  int Counts;
  List<EmployeeModel> Employees;

  CompanyDepartmentModel(
    this.Id,
    this.Ordering,
    this.Name,
    this.Notes,
    this.ParentId,
    this.Parent,
    this.Children,
    this.Counts,
    this.Employees,
  );

  @override
  factory CompanyDepartmentModel.fromJson(Map<String, dynamic> json) =>
      _$CompanyDepartmentModelFromJson(json);
}
